package com.foreknow.demo4;

/**
 * 构造器：初始化
 */
public class Person {
    private String id;
    private String name;
    private int age;


    public Person() {

    }

    public Person(String name,int age) {
        this.name = name;
        this.age = age;
    }

    public Person(String id,String name,int age) {
        this.id = id;
        this.name = name;
        this.age = age;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public static void main(String[] args) {
        Person p1 = new Person("10000","fender",20);
        Person p2 = new Person("10001","fender1",21);
        Person p3 = new Person("10002","fender2",22);
        System.out.println(p1.getName());
        System.out.println(p2.getId()+"--"+p2.getName()+"--"+p2.getAge());
        System.out.println(p3.getId()+"--"+p3.getName()+"--"+p3.getAge());
    }
}
